import Vue from "vue";
import Vuex from "vuex";
// 引入左侧菜单子树
import app from "./modules/app";
// 引入登录子树
import user from "./modules/user";
// 引入语言集子树
import lang from "./modules/lang";
// 引入getters
import getters from "./getters";
// 引入持久化插件
import createPersistedState from "vuex-persistedstate";

Vue.use(Vuex);

export default new Vuex.Store({
  plugins: [createPersistedState()],
  getters,
  modules: {
    // 添加左侧菜单子树
    app,
    // 添加登录子树
    user,
    lang,
  },
});
